package br.com.poc.pitagorasnumero.type;

import br.com.poc.pitagorasnumero.R;

/**
 * The Enum NameNumberType.
 */
public enum NameNumberType {

	/** The name one. */
	NAME_ONE(1, R.string.significado_um),

	/** The name two. */
	NAME_TWO(2, R.string.significado_dois),

	/** The name trhee. */
	NAME_TRHEE(3, R.string.significado_tres),

	/** The name four. */
	NAME_FOUR(4, R.string.significado_quatro),

	/** The name five. */
	NAME_FIVE(5, R.string.significado_cinco),

	/** The name six. */
	NAME_SIX(6, R.string.significado_seis),

	/** The name seven. */
	NAME_SEVEN(7, R.string.significado_sete),

	/** The name eight. */
	NAME_EIGHT(8, R.string.significado_oito),

	/** The name nine. */
	NAME_NINE(9, R.string.significado_nove),

	/** The name eleven. */
	NAME_ELEVEN(11, R.string.significado_onze),

	/** The name twenty two. */
	NAME_TWENTY_TWO(22, R.string.significado_vinte_dois),

	/** The name not found. */
	NAME_NOT_FOUND(0, R.string.sign_nao_endontrado);

	/** The id. */
	private int id;

	/** The resource. */
	private int resource;

	/**
	 * Gets the significado by id.
	 * 
	 * @param idArg
	 *            the id arg
	 * @return the significado by id
	 */
	public static NameNumberType getSignificadoById(final int idArg) {

		for (final NameNumberType sig : NameNumberType.values()) {
			if (idArg == sig.getId()) {
				return sig;
			}
		}

		return NAME_NOT_FOUND;
	}

	/**
	 * Instantiates a new significado numero domain.
	 * 
	 * @param id
	 *            the id
	 * @param resource
	 *            the resource
	 */
	private NameNumberType(final int id, final int resource) {
		this.id = id;
		this.resource = resource;
	}

	/**
	 * Gets the id.
	 * 
	 * @return the id
	 */
	public int getId() {
		return id;
	}

	/**
	 * Gets the resource.
	 * 
	 * @return the resource
	 */
	public int getResource() {
		return resource;
	}

}
